<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class Information extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    public static function open()
    {
        return self::where('state',1)->get(['id','title','cover','created_at']);
    }

    public static function show($id)
    {
        return self::where('id',$id)->first();
    }
}
